<h2>Edition des Grabs disponibles</h2>

<h3>Listes de Grab enregistré</h3>

<ul>
<?php
$oldSportId = null;
foreach ($grabs as $grab){
    $name = $grab['Grab']['name'];   
    $sportId = $grab['Grab']['sports_id'];
    
    if ($sportId != $oldSportId ){
        $oldSportId = $sportId ;
        echo '<h4>'.$sports[$sportId].'</h4>';
    }
    ?>
    <li>
        <h5 class="head"><?php echo $name;?> </h5>
        <p class="target">
            <?php echo $grab['Grab']['description'];?>
        </p>
    </li>    
<?php
}
?>
</ul>



<h3>Ajouter un grab</h3>

<div >
    <?php
    echo $this->Form->create('Grab', array('action' => 'admin_add'));
    echo $this->Form->input("Grab.sports_id", array(
        'label' => 'Le sport',
        
    ));        
    echo $this->Form->input("Grab.name", array());
    echo $this->Form->input("Grab.description", array(
        'type' => 'textarea'
    ));   
    echo $this->Form->end("Add");
    ?>
</div>